package com.summer.bilibili.domain.bangumi;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.summer.bilibili.domain.base.UserBaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;


import java.util.Date;

/**
 * 用户对番剧（bangumi）的订阅信息
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("bangumi_subscribe")
public class BangumiSubscribe extends UserBaseEntity {
    /**
     * 关联的节目id
     */
    private Long bangumiId;

    /**
     * 订阅时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    //@JsonProperty("subscribe_time")
    public Date getSubscribeDate () {
        return getCreateTime ( );
    }
}
